from django.urls import path
# from apps.study.views import StudentViewSet
from study.views import StudentViewSet, ClassesViewSet
from rest_framework.routers import SimpleRouter

urlpatterns=[
    # path('student/',StudentViewSet.as_view({'get':'list','post':'create'})),
    # path('student/<pk>/',StudentViewSet.as_view({'get':'retrieve','put':'update','delete':'destroy'})),
]

router=SimpleRouter()  #实例化路由器
router.register('student',StudentViewSet)  #注册路由
router.register('classes',ClassesViewSet)  #注册路由
urlpatterns += router.urls #获取生成的路由列表
